var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opens = _____WB$wombat$assign$function_____("opens"); jQuery(function () { /** * Handle the 'typing' event * * PRO ONLY function * * @return void */ jQuery(document).on("bleeper_typing", function(e) { /* TO DO */ jQuery(".typing_indicator").html(""+e.ndata.username+ " "+wplc_localized_string_is_typing_single + ""); jQuery(".typing_indicator").addClass("typing_indicator_active"); }); /** * Agent has stopped typing. * * * @return void */ jQuery(document).on("bleeper_stop_typing", function(e) { /* TO DO */ jQuery("#wplc_user_typing").fadeOut("slow").remove(); jQuery(".typing_indicator").removeClass("typing_indicator_active") }); /** * The agent has initiated a chat with us, open the chat box. * * @return void */ jQuery(document).on("bleeper_agent_initiated_chat", function(e) { var data = { relay_action: 'wplc_get_messages', security: wplc_nonce, chat_id: wplc_cid, limit:50, offset:0, received_via: 'u', wplc_extra_data:wplc_extra_data }; wplc_rest_api('get_messages', data, 12000, function(message_history) { if (typeof message_history.data !== "undefined" && typeof message_history.data.messages !== "undefined" && typeof message_history.data.messages === "object") { message_history = message_history.data.messages; for (var key in message_history) { var the_message = message_history[key]; the_message.mid = key; wplc_push_message_to_chatbox(the_message,'u', function() { wplc_scroll_to_bottom(); }); } } }); open_chat(1); jQuery.event.trigger({type: "wplc_open_chat_2", wplc_online: wplc_online}); }); /** * Sends the custom data packet via the socket if it exists */ jQuery(document).on("wplc_send_live_rating", function(e) { if(typeof e.rating !== "undefined"){ if(typeof socket !== "undefined" && typeof socket.emit !== "undefined"){ //We have a rating and a socket sprocket to send data with socket.emit('custom data',{action:'wplc_send_live_rating', chatid:wplc_cid, rating_data: e.rating}); } } }); /** * Edit message received from socket, edit in in the DOM * * PRO ONLY function * * @return void */ jQuery(document).on("bleeper_edit_message", function(e) { jQuery(".message_"+e.ndata.msgID+" .messageBody").html(wplcFormatParser(e.ndata.message) + " "+bleeper_localized_strings[4]+""); }); //Handler for edits jQuery(document).on("bleeper_edited_message", function(e){ if(typeof e.ndata !== "undefined"){ if(typeof e.ndata.message !== "undefined" && typeof e.ndata.chatid !== "undefined" && typeof e.ndata.msgID !== "undefined"){ var current_msg = e.ndata.message; var current_cid = e.ndata.chatid; var current_msg_id = e.ndata.msgID; var data = { chat_id: current_cid, message: current_msg, msg_id: current_msg_id }; wplc_rest_api('edit_message', data, 12000, null); } } }); /** * Sends minimize event via the socket if it exists */ jQuery(document).on("wplc_minimize_chat", function(e) { if(typeof socket !== "undefined" && typeof socket.emit !== "undefined"){ socket.emit('custom data',{action:'wplc_minimized', chatid:wplc_cid}); } }); /** * Send maximize event via socket if it exists */ jQuery(document).on("wplc_open_chat", function(e) { if(typeof socket !== "undefined" && typeof socket.emit !== "undefined"){ socket.emit('custom data',{action:'wplc_maximized', chatid:wplc_cid}); } }); jQuery(document).on("mouseleave",".wplc-user-message", function() { var tmid = jQuery(this).attr('mid'); jQuery(".message_"+tmid+ " .bleeper-edit-message").hide(); }); jQuery(document).on("mouseenter",".wplc-user-message", function() { var tmid = jQuery(this).attr('mid'); jQuery(".message_"+tmid+ " .bleeper-edit-message").show(); }); }); } /* FILE ARCHIVED ON 16:49:34 Jul 13, 2025 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 03:24:16 Apr 28, 2026. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): capture_cache.get: 36.727 load_resource: 563.218 PetaboxLoader3.resolve: 200.722 PetaboxLoader3.datanode: 270.43 (2) loaddict: 271.807 */